package com.bolt.admin.module.sys.dto;

import com.bolt.admin.module.sys.entity.OrgEntity;
import com.bolt.convention.validation.constraints.Mobile;
import com.bolt.support.query.conditions.domain.MatchType;
import com.bolt.support.spring.jpa.annotation.Filter;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;

@Data
public class OrgDTO {

    private String id;


    @ApiModelProperty(notes = "名称")
    @Filter(type = MatchType.BW, owned = OrgEntity.class)
    @NotBlank
    private String name;


    @ApiModelProperty(notes = "机构编号")
    @Filter(type = MatchType.BW, owned = OrgEntity.class)
    private String code;


    @ApiModelProperty(notes = "区域编码")
    @Filter(type = MatchType.BW, owned = OrgEntity.class)
    @NotBlank
    private String areaCode;


    @ApiModelProperty(notes = "联系地址")
    private String address;


    @ApiModelProperty(notes = "邮政编码")
    private String zipCode;


    @ApiModelProperty(notes = "父级节点")
    private String pid;


    @ApiModelProperty(notes = "负责人")
    private String master;

    @ApiModelProperty(notes = "电话")
    @Mobile
    private String tel;

    @ApiModelProperty(notes = "邮箱")
    private String email;

    @ApiModelProperty(notes = "备注信息")
    private String remarks;

    @ApiModelProperty(notes = "状态：1启用、0禁用")
    @Filter(type = MatchType.EQ, owned = OrgEntity.class)
    private Boolean enabled;

    @ApiModelProperty(notes = "地区名称")
    private String areaName;


    @ApiModelProperty(notes = "")
    private Integer lft;


    @ApiModelProperty(notes = "")
    private Integer rgt;


    @ApiModelProperty(notes = "")
    private Integer depth;


    @ApiModelProperty(notes = "")
    private Integer versionNO;

}